// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期：2024-04-24 15:48:40
// 生成路径: api/v1/business/performances.go
// 生成人：周志雄
// desc:演出节目相关参数
// company:云南奇讯科技有限公司
// ==========================================================================

package business

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/gtime"
	commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
	"github.com/tiger1103/gfast/v3/internal/app/business/model"
)

// PerformancesSearchReq 分页请求参数
type PerformancesSearchReq struct {
	g.Meta            `path:"/list" tags:"演出节目" method:"get" summary:"演出节目列表"`
	PerformanceName   string `p:"performanceName"`                                                                   //节目名
	PerformanceDate   string `p:"performanceDate" v:"performanceDate@datetime#演出日期需为YYYY-MM-DD hh:mm:ss格式"`          //演出日期
	PerformanceTime   string `p:"performanceTime"`                                                                   //演出时间
	StartSaleTime     string `p:"startSaleTime" v:"startSaleTime@datetime#开售时间需为YYYY-MM-DD hh:mm:ss格式"`              //开售时间
	TicketReclaimTime string `p:"ticketReclaimTime" v:"ticketReclaimTime@datetime#直通车票号回收时间需为YYYY-MM-DD hh:mm:ss格式"` //直通车票号回收时间
	TicketPickupTime  string `p:"ticketPickupTime" v:"ticketPickupTime@datetime#取票时间需为YYYY-MM-DD hh:mm:ss格式"`        //取票时间
	VenueId           string `p:"venueId" v:"venueId@integer#场馆ID需为整数"`                                              //场馆ID
	ProgramTypeId     string `p:"programTypeId" v:"programTypeId@integer#节目类型ID需为整数"`                                //节目类型ID
	CreatedAt         string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"`                      //创建时间
	PageNum           int    `p:"pageNum" dc:"当前页码"`                                                                 //当前页码
	PageSize          int    `p:"pageSize" dc:"每页数"`                                                                 //每页数
	commonApi.Author
}

// PerformancesSearchRes 列表返回结果
type PerformancesSearchRes struct {
	g.Meta `mime:"application/json"`
	commonApi.ListRes
	List []*model.PerformancesListResVo `json:"list"`
}

// PerformancesAddReq 添加操作请求参数
type PerformancesAddReq struct {
	g.Meta `path:"/add" tags:"演出节目" method:"post" summary:"演出节目添加"`
	commonApi.Author
	PerformanceName   string      `p:"performanceName" v:"required#节目名不能为空"`
	PerformanceDate   *gtime.Time `p:"performanceDate" v:"required#演出日期不能为空"`
	PerformanceTime   string      `p:"performanceTime" v:"required#演出时间不能为空"`
	StartSaleTime     *gtime.Time `p:"startSaleTime" v:"required#开售时间不能为空"`
	TicketReclaimTime *gtime.Time `p:"ticketReclaimTime" v:"required#直通车票号回收时间不能为空"`
	TicketPickupTime  *gtime.Time `p:"ticketPickupTime" v:"required#取票时间不能为空"`
	VenueId           int         `p:"venueId" v:"required#场馆ID不能为空"`
	ProgramTypeId     int         `p:"programTypeId" v:"required#节目类型ID不能为空"`
	ReservedIds       []int       `json:"reservedIds" dc:"预定的座位ID列表"`
}

// PerformancesAddRes 添加操作返回结果
type PerformancesAddRes struct {
	commonApi.EmptyRes
}

// PerformancesEditReq 修改操作请求参数
type PerformancesEditReq struct {
	g.Meta `path:"/edit" tags:"演出节目" method:"put" summary:"演出节目修改"`
	commonApi.Author
	Id                int         `p:"id" v:"required#主键ID不能为空"`
	PerformanceName   string      `p:"performanceName" v:"required#节目名不能为空"`
	PerformanceDate   *gtime.Time `p:"performanceDate" v:"required#演出日期不能为空"`
	PerformanceTime   string      `p:"performanceTime" v:"required#演出时间不能为空"`
	StartSaleTime     *gtime.Time `p:"startSaleTime" v:"required#开售时间不能为空"`
	TicketReclaimTime *gtime.Time `p:"ticketReclaimTime" v:"required#直通车票号回收时间不能为空"`
	TicketPickupTime  *gtime.Time `p:"ticketPickupTime" v:"required#取票时间不能为空"`
	VenueId           int         `p:"venueId" v:"required#场馆ID不能为空"`
	ProgramTypeId     int         `p:"programTypeId" v:"required#节目类型ID不能为空"`
}

// PerformancesEditRes 修改操作返回结果
type PerformancesEditRes struct {
	commonApi.EmptyRes
}

// PerformancesGetReq 获取一条数据请求
type PerformancesGetReq struct {
	g.Meta `path:"/get" tags:"演出节目" method:"get" summary:"获取演出节目信息"`
	commonApi.Author
	Id int `p:"id" v:"required#主键必须"` //通过主键获取
}

// PerformancesGetRes 获取一条数据结果
type PerformancesGetRes struct {
	g.Meta `mime:"application/json"`
	*model.PerformancesInfoRes
}

// PerformancesDeleteReq 删除数据请求
type PerformancesDeleteReq struct {
	g.Meta `path:"/delete" tags:"演出节目" method:"delete" summary:"删除演出节目"`
	commonApi.Author
	Ids []int `p:"ids" v:"required#主键必须"` //通过主键删除
}

// PerformancesDeleteRes 删除数据返回
type PerformancesDeleteRes struct {
	commonApi.EmptyRes
}

// 获取演出节目座位数据
type PerformancesSeatStaticInfoReq struct {
	g.Meta `path:"/summary" tags:"演出节目" method:"get" summary:"根据演出节目ID获取座位实时数据"`
	commonApi.Author
	PerformanceId int `json:"performanceId" dc:"演出节目ID"`
}

type PerformancesSeatStaticInfoRes struct {
	List []model.SeatsStatusStatic `json:"list"`
}
